<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import Header from './components/Header.vue'

const route = useRoute()
const showHeader = computed(() => route.path !== '/login')
</script>

<template>
  <div class="app-container">
    <Header v-if="showHeader" />
    <div class="main-content" :class="{ 'with-header': showHeader }">
      <router-view></router-view>
    </div>
  </div>
</template>

<style>
.app-container {
  min-height: 100vh;
  background-color: #f5f7fa;
}

.main-content {
  min-height: 100vh;
  transition: all 0.3s ease;
}

.main-content.with-header {
  padding-top: 60px;
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
